package com.ai.wxy.spring.jpa.user.dto;

import com.ai.spring.common.annotation.AddGroup;
import com.ai.spring.common.annotation.EditGroup;
import com.ai.wxy.spring.service.api.dto.ServiceParam;
import com.ai.wxy.spring.service.api.dto.ServiceResult;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 用户角色
 *
 * @author 石头
 * @Date 2019/11/20
 * @Version 1.0
 **/
@Data
public class UserRoleDTO implements ServiceParam {
    /**用户ID*/
    @NotNull(groups = {AddGroup.class, EditGroup.class},message = "用户ID不能为空")
    private Long userId;
    /**用户角色*/
    @NotEmpty(groups = AddGroup.class,message = "用户角色信息不能为空")
    private List<RoleDTO> roles;
}
